package com.tepth.remote.control.base.bean;

import com.alibaba.fastjson.JSONObject;

/**
 * Description:
 *
 * @author Hequn.Lee
 * @date 2018/11/12
 */
public class Gps {
    /**
     * 当前时间
     */
    private String time;
    /**
     * 纬度
     */
    private double latitude;
    /**
     * 经度
     */
    private double longitude;
    /**
     * 手机串号
     */
    private String imei;
    /**
     * 电话永远为空 tel
     * 海拔永远为0 G_Altitude
     * 用户ID
     */
    private int uid;
    /**
     * GPS时间
     */
    private String gpsTime;
    /**
     * GPS定位提供者
     */
    private String desc;
    /**
     * 精度
     */
    private String accuracy;
    /**
     * 方位
     */
    private String bearing;
    /**
     * 速度
     */
    private String speed;

    public String getTime() {
        return time;
    }

    public Gps setTime(String time) {
        this.time = time;
        return this;
    }

    public double getLatitude() {
        return latitude;
    }

    public Gps setLatitude(double latitude) {
        this.latitude = latitude;
        return this;
    }

    public double getLongitude() {
        return longitude;
    }

    public Gps setLongitude(double longitude) {
        this.longitude = longitude;
        return this;
    }

    public String getImei() {
        return imei;
    }

    public Gps setImei(String imei) {
        this.imei = imei;
        return this;
    }

    public int getUid() {
        return uid;
    }

    public Gps setUid(int uid) {
        this.uid = uid;
        return this;
    }

    public String getGpsTime() {
        return gpsTime;
    }

    public Gps setGpsTime(String gpsTime) {
        this.gpsTime = gpsTime;
        return this;
    }

    public String getDesc() {
        return desc;
    }

    public Gps setDesc(String desc) {
        this.desc = desc;
        return this;
    }

    public String getAccuracy() {
        return accuracy;
    }

    public Gps setAccuracy(String accuracy) {
        this.accuracy = accuracy;
        return this;
    }

    public String getBearing() {
        return bearing;
    }

    public Gps setBearing(String bearing) {
        this.bearing = bearing;
        return this;
    }

    public String getSpeed() {
        return speed;
    }

    public Gps setSpeed(String speed) {
        this.speed = speed;
        return this;
    }

    public JSONObject toJSONObject() {
        JSONObject json = new JSONObject();
        json.put("time", time);
        json.put("lat", latitude);
        json.put("lng", longitude);
        json.put("Imei", imei);
        json.put("tel", "");
        json.put("uid", uid);
        json.put("gpsTime", gpsTime);
        json.put("g_Desc", desc);
        json.put("g_Accuracy", accuracy);
        json.put("g_Altitude", "0");
        json.put("g_Bearing", bearing);
        json.put("g_Speed", speed);
        return json;
    }
}
